package com.tkuniyoshi.battleship.server.service.servlet;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.tkuniyoshi.battleship.server.common.log.BSGSLogger;
import com.tkuniyoshi.battleship.server.common.log.logmessage.LogMessage;
import com.tkuniyoshi.battleship.server.common.util.util;

public class ClientServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse res) {
		
	}

	private Boolean isAllowAgent(String processName, HttpServletRequest req) {
		Boolean ans = false;
		String userAgent = req.getHeader("User-Agent");

		try {
			for (String allowAgent : util.ARROW_USERAGENT) {
				if (userAgent.contains(allowAgent)) {
					ans = true;
				}
			}
		} catch (Exception er) {
			BSGSLogger.printLog(LogMessage.E10000, new Object[] { processName }, er);
		}

		if (ans == false) {
			BSGSLogger.printLog(LogMessage.W10052, new Object[] { req.getRemoteAddr(), userAgent });
		}

		return ans;
	}
}
